import React, {Component} from 'react';
import moment from 'moment'
import Errimg from './img/error.png'

class Err extends Component{
  constructor(props){
    super(props)
    this.state ={
      content:'',
      time:moment().format('YYYY-MM-DD HH:mm:ss')
    }
    this.handleClose = this.handleClose.bind(this)
  }
  componentDidMount(){
    setInterval(()=>{
      let time = moment()
      this.setState({
        time:time.format('YYYY-MM-DD HH:mm:ss')
      })
    },1000)
  }
  handleClose(){
    window.open('','_self','');
    window.close();
  }
  render(){
    const App =(
      <div className="m-detail">
        <div className="top">
          <div className="time">{this.state.time}</div>
        </div>
        <div className="err">
          <img src={Errimg} />
          {/* <div className='close' onClick={this.handleClose}>返回主页</div> */}
        </div>
        
      </div>
    )
    return App
  }
}

export default Err